<?php $id="form_".uniqid();?>
<table id="<?php echo $id;?>"></table>
<script>
    $("#<?php echo $id;?>").DataSource({url:'payset/get_pay_types',
        fields:[
            [{title:'公司自定义支付设定', colspan:3}],
            [
                {field:'id',title:'编号',align:'center',width:200,sortable:true},
                {field:'type',title:'名称',align:'center',width:200,sortable:true},
                {field:'op',  title:'进行设定', align:'center',width:320, sortable:false,formatter:function(v,r){
                    var str = '<a herf="#" class="btn btn-danger btn-xs" onclick=Core.dialog(\'基本资料设定\',\'payset/edit_pay_setting\',function(){},true,true);>设定</a>&nbsp;&nbsp;';
                    if (r.can_del) {
                              str += '<a herf="#" class="btn btn-danger btn-xs" onclick="del_pay_type()">删除</a>&nbsp;';
                    }
                    return str;
                }}
            ]
        ], tools:[

        ],
        edit:true,
        checkbox:false,
        footer:true,
        success:function(){

        }
    });

    function del_pay_type()
    {
        $('#<?php echo $id?>').DataSource('remove',{get:'payset/del_pay_type'});
    }
</script>